<template>
    <div class="footer">
      <div class="left">
    
      <span class="gas1">车间温度:
        <span class="block">26</span>
        <span style="color: #CDCDCD;">℃</span>
        
      </span>
      <span  class="gas1">车间湿度:
        <span class="block">40</span>
        <span style="color: #CDCDCD;">％</span>
        
      </span>
    </div>
    <vue-seamless-scroll class="seamless-warp" :class-option="classOption">
    <div class="right">
      <span>打磨室:</span>
      <span class="gas">O₂:
        <span class="block">20.9</span>
        <span style="color: #CDCDCD;">%Vol</span>
        
      </span>
      <span  class="gas">EX:
        <span class="block">0.00</span>
        <span style="color: #CDCDCD;">%LEL</span>
        
      </span>
    </div>
    <div class="right">
      <span>焊接室:</span>
      <span class="gas">O₂:
        <span class="block">{{this.newGas[0].gasvalue2}}</span>
        <span style="color: #CDCDCD;">%Vol</span>
        
      </span>
      <span  class="gas">EX:
        <span class="block">{{this.newGas[0].gasvalue1}}</span>
        <span style="color: #CDCDCD;">%LEL</span>
        
      </span>
    </div>
  </vue-seamless-scroll>
    </div>
</template>

<script>
import {GetGas} from "@/api"
export default {
  data() {
      return {
        gasList:[],
        newGas:[]
      }
  },
  mounted() {
  
      this.getGas()


  },
  computed: {
    classOption () {
  return {
  step: 1, // 数值越大速度滚动越快
  limitMoveNum: 0, // 开始无缝滚动的数据量 this.dataList.length
  hoverStop: true, // 是否开启鼠标悬停stop
  direction: 1, // 0向下 1向上 2向左 3向右
  openWatch: true, // 开启数据实时监控刷新dom
  singleHeight: 0, // 单步运动停止的高度(默认值0是无缝不停止的滚动) direction => 0/1
  singleWidth: 0, // 单步运动停止的宽度(默认值0是无缝不停止的滚动) direction => 2/3
  waitTime: 1000 // 单步运动停止的时间(默认值1000ms)
  }
  },

  },
  methods: {
    getGas(){
      GetGas().then(res=>{

  
       this.newGas = res.data.data
       console.log(this.newGas);
      })
  }
},
}
</script>

<style lang="scss" scoped>
.left{
  display: flex;
  width: 45%;
  margin-left: .1042rem;
}
.right{
  display: flex;
  justify-content: space-around;
  width: 100%;
  
}
.seamless-warp{
 width: 50%;
 height: 80vh;
 display: flex;
 justify-content: space-around;
 
//  margin-top: 0.1094rem;
 overflow: hidden;
}
</style>